import utils from "../../utils/utils";

Page({

  data: {
    notifyList: []
  },
  onload() {
    this.getNotifyList();
  },
  /**
   * 获取社区公告
   */
  async getNotifyList() {

    const res = await wx.http({
      url: '/announcement'
    });

    if (res.data.code !== 10000) return utils.toast('获取通知列表失败');
    this.setData({
      notifyList: res.data.data
    });
  }
})
